package es.mgil.soaTest;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class MainActivity extends Activity implements OnClickListener {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_layout);

		findViewById(R.id.restButton).setOnClickListener(this);
		findViewById(R.id.soapButton).setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		Intent intent = null;
		switch (v.getId()) {
		case (R.id.restButton):
			intent = new Intent(this, RestMainActivity.class);
			break;
		case (R.id.soapButton):
			intent = new Intent(this, SoapMainActivity.class);
			break;
		}

		if (intent != null) {
			this.startActivity(intent);
		}
	}
}
